#!/usr/bin/env python
PACKAGE = "pure_pursuit_pkg"

from dynamic_reconfigure.parameter_generator_catkin import *
gen = ParameterGenerator()
#speed pid 
gen.add("speedKp",    double_t,   1, "speed pid Kp", 0.5,  0, 50)
gen.add("speedKi",    double_t,    1, "speed pid Ki", 0.5,  0, 50)
gen.add("speedKd",    double_t,    1, "speed pid Kd", 0,  0, 50)
gen.add("speedIntergrationDownLimit",    double_t,    1, "speed pid intergration min", -1,  -1, 1)
gen.add("speedIntergrationUplimit",    double_t,    1, "speed pid intergration max", 1,  -1, 1)
gen.add("speedDownLimit",    double_t,    1, "speed pid output min", -1,  -1, 1)
gen.add("speedUpLimit",    double_t,    1, "speed pid output max", 1,  -1, 1)
#position pid
gen.add("positionKp",    double_t,    2, "position pid Kp", 0.5,  0, 50)
gen.add("positionKi",    double_t,    2, "position pid Ki", 0,  0, 50)
gen.add("positionKd",    double_t,    2, "position pid Kd", 0,  0, 1)
gen.add("positionIntergrationDownLimit",    double_t,    2, "position pid intergration min", 0,  0, 30)
gen.add("positionIntergrationUplimit",    double_t,    2, "position pid intergration max", 30,  0, 30)
gen.add("positionDownLimit",    double_t,    2, "position pid output min", 0,  0, 30)
gen.add("positionUpLimit",    double_t,    2, "position pid output max", 30,  0, 30)
#mode and special mode parameter
gen.add("speedTestOnly",    bool_t,    3, "test pid speed ctr", False)
gen.add("speedCmd",    double_t,    3, "speed cmd under speedTestOnly mode", 0,  0, 30)
gen.add("speedPositonTestOnly",    bool_t,    3, "test speed and postion ctr", False)
gen.add("PositonTestOnly",    bool_t,    3, "test  postion ctr and speed ctr is not done by ros", False)
gen.add("stop",    bool_t,    3, "brake and no drive", True)
#others
gen.add("lookahead_distance",    double_t,    4, "lookahead distance", 3,  0, 5)
gen.add("axleBase",    double_t,    4, "lookahead distance", 2.85,  0, 5)
exit(gen.generate(PACKAGE, "pure_pursuit_pkg", "purePursuit"))
